package com.ruoyi.cust.service.impl;

import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cust.mapper.CityUserMapper;
import com.ruoyi.cust.domain.CityUser;
import com.ruoyi.cust.service.ICityUserService;

/**
 * 微信号Service业务层处理
 *
 * @author cjq
 * @date 2024-12-06
 */
@Service
public class CityUserServiceImpl implements ICityUserService {
    @Autowired
    private CityUserMapper cityUserMapper;

    /**
     * 查询微信号
     *
     * @param userId 微信号主键
     * @return 微信号
     */
    @Override
    public CityUser selectCityUserByUserId(Long userId) {
        return cityUserMapper.selectCityUserByUserId(userId);
    }

    /**
     * 查询微信号列表
     *
     * @param cityUser 微信号
     * @return 微信号
     */
    @Override
    public List<CityUser> selectCityUserList(CityUser cityUser) {
        return cityUserMapper.selectCityUserList(cityUser);
    }

    /**
     * 新增微信号
     *
     * @param cityUser 微信号
     * @return 结果
     */
    @Override
    public int insertCityUser(CityUser cityUser) {
                cityUser.setCreateTime(DateUtils.getNowDate());
            return cityUserMapper.insertCityUser(cityUser);
    }

    /**
     * 修改微信号
     *
     * @param cityUser 微信号
     * @return 结果
     */
    @Override
    public int updateCityUser(CityUser cityUser) {
        return cityUserMapper.updateCityUser(cityUser);
    }

    /**
     * 批量删除微信号
     *
     * @param userIds 需要删除的微信号主键
     * @return 结果
     */
    @Override
    public int deleteCityUserByUserIds(Long[] userIds) {
        return cityUserMapper.deleteCityUserByUserIds(userIds);
    }

    /**
     * 删除微信号信息
     *
     * @param userId 微信号主键
     * @return 结果
     */
    @Override
    public int deleteCityUserByUserId(Long userId) {
        return cityUserMapper.deleteCityUserByUserId(userId);
    }
}
